import random

import requests
import json

url = "http://127.0.0.1:18000/network/contacts/"
headers = {
    'Content-Type': 'application/json'
}

for i in range(10000):
    payload = json.dumps({
        "o_node_id": f"{random.randint(1, 1500)}",
        "s_node_id": f"{random.randint(1, 1500)}",
        "rel_info": {
            "location_id": f"{random.randint(1, 100)}",
            "shaftWidth": f"{random.randint(1, 10)}",
            "time": "2021-05-13"
        }
    })
    response = requests.request("POST", url, headers=headers, data=payload)
    print(response.text)
